<h2>Upcoming reservations</h2>

<% start_date = 1.days.ago %>
<ul class="bookinglist">
<% @reservations.each do |res| %>
<% title = res.start_date.strftime('%a, %d %b %Y') %>
<% if start_date != nil and title != start_date.strftime('%a, %d %b %Y') -%>
    <li class="date"><h3><%= title %></h3></li>
    <% start_date = res.start_date -%>
<% end -%>

    <li><%= view_reservation(res) %></li>
<% end %>
</ul>

<% unless !session[:member_id] -%>
<h3 class="sep" style="clear:left">Make a new reservation</h3>
<ul class="options">
	<% @categories.each do |category| %>
	<li><%= link_to(category.title, :controller => 'reservations', :action => 'new', :category_id => category.id)%>
	<% end %>
</ul>
<% end %>